del .\compiled\ViewlinkDC_x64.exe
del .\compiled\ViewlinkDC_x64.pdb
rem call UpdateRevision.bat %1 %2 %3 %4
if errorlevel 1 goto :error

call tools\ExtractVersion.bat %1 %2 %3 %4
if errorlevel 1 goto :error

call "%VS100COMNTOOLS%\..\..\VC\bin\amd64\vcvars64.bat"
"%VS100COMNTOOLS%..\ide\devenv" ViewlinkDC_2010.sln /Rebuild "Release|x64"

call Tools\MakePortalBrowserFileList.bat x64
call src_gen_filename.bat -x64
7z.exe a -r -t7z -m0=lzma -mx=9 -mfb=512 -md=1024m -ms=on -x@src_exclude_hard.txt -i@PortalBrowserFileList.txt %FILE_NAME%.7z compiled/Settings/Custom*.* compiled/ViewlinkDC_x64.exe compiled/Themes/*_x64.dll compiled/lang/*.xml

call src_gen_filename.bat -debug-info
7z.exe a -r -t7z -m0=lzma -mx=9 -mfb=512 -md=1024m -ms=on %FILE_NAME%.7z *.pdb -x!ViewUpdate.pdb -x!UpdateMaker.pdb -x!vc100.pdb -x!vc10 

goto :end

:error
echo Can't update/extract version/revision
pause

:end
